
    function modifyPassword() {

        $.ajax({
            url:"ModifyPasswordServlet",
            type:"POST",
            async:true,
            catch:false,
            dataType:"json",//表示请求的返回数据格式{"username":"sss","password":"111"}
            contentType:"application/x-www-form-urlencoded;charset=utf-8",
            data:{
                oldPassword:$("#oldPassword").val(),
                newPassword:$("#newPassword").val()
            },
            success:function (data) {//回调函数
               alert(data.message);
            }


        })
   } 